package com.stars.sun.mvc;

import com.stars.sun.reflect.MyReflect;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by 340082 on 2018/2/2.
 */
public class startMVC extends HttpServlet {

    //对应的类的路径
    private Map<String,Map<String,Map>> serverMap ;

    @Override
    public void init() throws ServletException {
        MyReflect myReflect = new MyReflect();
        myReflect.getPathClassForPath("com.stars.sun.service");
        super.init();
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        new ActionHandler().handler(req,resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        new ActionHandler().handler(req,resp);
    }
}
